package item14;

public class UpdateStu implements Comparable<Object> {

	String name;
	long id;

	public UpdateStu(String name, long id) {
		this.id = id;
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	@Override
	public int compareTo(Object o) {
		UpdateStu updateStu = (UpdateStu) o;
		int result = id > updateStu.id ? 1 : (id == updateStu.id ? 0 : -1);
		return result;
	}

}
